From: Florian Müllner Date: Wed, 26 Jan 2022 15:48:55 +0000 (+0100) Subject: shell/app: Do not try to activate OR windows X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~227 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f9037f5889801c80d15ee3dc45c9a9f8cc57feba;p=gnome-shell.git shell/app: Do not try to activate OR windows Since https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2029, we track all windows, including OR ones. While this means that we can now assume that any window can be matched to an app, it also means we have to be more careful to not perform an unsupported action like focus or raise on an OR window. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4973 Part-of: --- diff --git a/src/shell-app.c b/src/shell-app.c index a3215db59..863f4db9d 100644 --- a/src/shell-app.c +++ b/src/shell-app.c @@ -423,8 +423,19 @@ shell_app_activate_window (ShellApp *app, return; windows = shell_app_get_windows (app); - if (window == NULL && windows) - window = windows->data; + if (window == NULL) + { + for (GSList *l = windows; l; l = l->next) + { + MetaWindow *current_window = l->data; + + if (!meta_window_is_override_redirect (current_window)) + { + window = current_window; + break; + } + } + } if (!g_slist_find (windows, window)) return; @@ -453,7 +464,9 @@ shell_app_activate_window (ShellApp *app, { MetaWindow *other_window = iter->data; - if (other_window != window && meta_window_get_workspace (other_window) == workspace) + if (other_window != window && + !meta_window_is_override_redirect (other_window) && + meta_window_get_workspace (other_window) == workspace) meta_window_raise (other_window); } g_slist_free (windows_reversed);